package Exists;

import java.util.Scanner;

public class Demo04 {
    public static void main(String[] args) {


        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个数");
        int res = scanner.nextInt();


        while (true) {
            try {
                System.out.println("请输入第二个数");
                int res1 = scanner.nextInt();

                if (res1 == 0) {
                    System.out.println("对不起你输入的数字不能为0");

                } else {

                    System.out.println(res/res1);
                    break;

                }
            } catch (ArithmeticException e) {

                System.out.println(e.getMessage());
            }

        }
    }


}
